package edu.zcmu.seckill.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import edu.zcmu.seckill.entity.SeckillOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import edu.zcmu.seckill.vo.GenerateOrderVo;
import edu.zcmu.seckill.vo.PayVo;
import edu.zcmu.seckill.vo.SeckillOrderInfoVo;
import edu.zcmu.seckill.vo.SeckillOrderVo;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 唐诗
 * @since 2022-02-22
 */
public interface SeckillOrderService extends IService<SeckillOrder> {

    String getSeckillPath(Integer id, String code, HttpServletRequest request);

    String generateOrder(GenerateOrderVo generateOrderVo,HttpServletRequest request);
    int createSeckillOrder(SeckillOrder order);

    SeckillOrderVo querySeckillProduct(SeckillOrderInfoVo vo, HttpServletRequest request);

    void updateSeckillOrder(SeckillOrder seckillOrder);

    SeckillOrder querySeckillOrder(String orderId,String productId,String userId);


    Page<SeckillOrder> getUserOrderByUid(Page<SeckillOrder> page,String uid);

    int delUserOrder(PayVo payVo, String uid);

    /**
     * 压测
     * @param id
     * @param request
     * @return
     */
    public String generateOrderTest(String id,HttpServletRequest request);
}
